-- GENERATED SPELL FOR [Quilguard Champion] --


function spell0_4623(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_4623', 655, 1)
end

function spell1_4623(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_4623', 641, 1)
end

function spell2_4623(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(15572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4623', 30256, 1)
end

function Sorts_4623(pUnit, Event)
local choix_sorts_4623 = math.random(0, 2)
if choix_sorts_4623 == 0 then
pUnit:RegisterEvent('spell0_4623', 1, 1)
end
if choix_sorts_4623 == 1 then
pUnit:RegisterEvent('spell1_4623', 1, 1)
end
if choix_sorts_4623 == 2 then
pUnit:RegisterEvent('spell2_4623', 1, 1)
end
end

function mob4623_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4623', math.random(1500, 3000), 1)
end

function mob4623_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4623_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4623_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4623, 1, 'mob4623_Action')
RegisterUnitEvent(4623, 2, 'mob4623_Leave')
RegisterUnitEvent(4623, 3, 'mob4623_Kill')
RegisterUnitEvent(4623, 4, 'mob4623_Die')
